import request from "@/utils/request";

export const login = (data) => {
  return request({
    url: "/api/user-service/user/login",
    method: "post",
    data,
  });
};

export const getTask = (params) => {
  return request({
    url: "/api/task-service/task/search",
    method: "get",
    params,
  });
};

export const createTask = (data) => {
  return request({
    url: "/api/task-service/task/create",
    method: "post",
    data,
  });
};

export const taskId = (params) => {
  return request({
    url: `api/user-service/user/operatorList/${params}`,
  });
};

export const getSearchList = (params) => {
  return request({
    url: `/api/task-service/task/search`,
    params,
  });
};

export const getAreaManage = (params) => {
  return request({
    url: "/api/vm-service/region/search",
    params,
  });
};

export const getCreateArea = (data) => {
  return request({
    url: "/api/vm-service/region",
    method: "post",
    data,
  });
};

export const getNodeSearch = (params) => {
  return request({
    url: "/api/vm-service/node/search",
    params,
  });
};

export const getAreaList = (params, regionId) => {
  return request({
    url: `/api/vm-service/region/search`,
    params,
  });
};

export const getCommitSearch = (params) => {
  return request({
    url: `/api/user-service/partner/search`,
    params,
  });
};

export const getDeleteList = (params, id) => {
  return request({
    url: `/api/user-service/partner/${id}`,
    method: "delete",
    params,
  });
};
